

<!DOCTYPE html>

<html>
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Syntax of AMDGPU Instruction Modifiers &#8212; LLVM 9 documentation</title>
    <link rel="stylesheet" href="_static/llvm-theme.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    <script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
    <script src="_static/jquery.js"></script>
    <script src="_static/underscore.js"></script>
    <script src="_static/doctools.js"></script>
    <script src="_static/language_data.js"></script>
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />
    <link rel="next" title="Syntax of AMDGPU Instruction Operands" href="AMDGPUOperandSyntax.html" />
    <link rel="prev" title="Type deviation" href="AMDGPU/gfx10_type_dev.html" />
<style type="text/css">
  table.right { float: right; margin-left: 20px; }
  table.right td { border: 1px solid #ccc; }
</style>

  </head><body>
<div class="logo">
  <a href="index.html">
    <img src="_static/logo.png"
         alt="LLVM Logo" width="250" height="88"/></a>
</div>

    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="AMDGPUOperandSyntax.html" title="Syntax of AMDGPU Instruction Operands"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="AMDGPU/gfx10_type_dev.html" title="Type deviation"
             accesskey="P">previous</a> |</li>
  <li><a href="http://llvm.org/">LLVM Home</a>&nbsp;|&nbsp;</li>
  <li><a href="index.html">Documentation</a>&raquo;</li>

          <li class="nav-item nav-item-1"><a href="AMDGPUUsage.html" accesskey="U">User Guide for AMDGPU Backend</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="">Syntax of AMDGPU Instruction Modifiers</a></li> 
      </ul>
    </div>


    <div class="document">
      <div class="documentwrapper">
          <div class="body" role="main">
            
  <div class="section" id="syntax-of-amdgpu-instruction-modifiers">
<h1>Syntax of AMDGPU Instruction Modifiers<a class="headerlink" href="#syntax-of-amdgpu-instruction-modifiers" title="Permalink to this headline">¶</a></h1>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><p><a class="reference internal" href="#conventions" id="id30">Conventions</a></p></li>
<li><p><a class="reference internal" href="#modifiers" id="id31">Modifiers</a></p>
<ul>
<li><p><a class="reference internal" href="#ds-modifiers" id="id32">DS Modifiers</a></p>
<ul>
<li><p><a class="reference internal" href="#offset8" id="id33">offset8</a></p></li>
<li><p><a class="reference internal" href="#offset16" id="id34">offset16</a></p></li>
<li><p><a class="reference internal" href="#swizzle-pattern" id="id35">swizzle pattern</a></p></li>
<li><p><a class="reference internal" href="#gds" id="id36">gds</a></p></li>
</ul>
</li>
<li><p><a class="reference internal" href="#exp-modifiers" id="id37">EXP Modifiers</a></p>
<ul>
<li><p><a class="reference internal" href="#done" id="id38">done</a></p></li>
<li><p><a class="reference internal" href="#compr" id="id39">compr</a></p></li>
<li><p><a class="reference internal" href="#vm" id="id40">vm</a></p></li>
</ul>
</li>
<li><p><a class="reference internal" href="#flat-modifiers" id="id41">FLAT Modifiers</a></p>
<ul>
<li><p><a class="reference internal" href="#offset12" id="id42">offset12</a></p></li>
<li><p><a class="reference internal" href="#offset13s" id="id43">offset13s</a></p></li>
<li><p><a class="reference internal" href="#offset12s" id="id44">offset12s</a></p></li>
<li><p><a class="reference internal" href="#offset11" id="id45">offset11</a></p></li>
<li><p><a class="reference internal" href="#dlc" id="id46">dlc</a></p></li>
<li><p><a class="reference internal" href="#glc" id="id47">glc</a></p></li>
<li><p><a class="reference internal" href="#lds" id="id48">lds</a></p></li>
<li><p><a class="reference internal" href="#slc" id="id49">slc</a></p></li>
<li><p><a class="reference internal" href="#tfe" id="id50">tfe</a></p></li>
<li><p><a class="reference internal" href="#nv" id="id51">nv</a></p></li>
</ul>
</li>
<li><p><a class="reference internal" href="#mimg-modifiers" id="id52">MIMG Modifiers</a></p>
<ul>
<li><p><a class="reference internal" href="#dmask" id="id53">dmask</a></p></li>
<li><p><a class="reference internal" href="#unorm" id="id54">unorm</a></p></li>
<li><p><a class="reference internal" href="#id1" id="id55">glc</a></p></li>
<li><p><a class="reference internal" href="#id2" id="id56">slc</a></p></li>
<li><p><a class="reference internal" href="#r128" id="id57">r128</a></p></li>
<li><p><a class="reference internal" href="#id3" id="id58">tfe</a></p></li>
<li><p><a class="reference internal" href="#lwe" id="id59">lwe</a></p></li>
<li><p><a class="reference internal" href="#da" id="id60">da</a></p></li>
<li><p><a class="reference internal" href="#d16" id="id61">d16</a></p></li>
<li><p><a class="reference internal" href="#a16" id="id62">a16</a></p></li>
<li><p><a class="reference internal" href="#dim" id="id63">dim</a></p></li>
<li><p><a class="reference internal" href="#id4" id="id64">dlc</a></p></li>
</ul>
</li>
<li><p><a class="reference internal" href="#miscellaneous-modifiers" id="id65">Miscellaneous Modifiers</a></p>
<ul>
<li><p><a class="reference internal" href="#amdgpu-synid-dlc" id="id66">dlc</a></p></li>
<li><p><a class="reference internal" href="#amdgpu-synid-glc" id="id67">glc</a></p></li>
<li><p><a class="reference internal" href="#amdgpu-synid-lds" id="id68">lds</a></p></li>
<li><p><a class="reference internal" href="#amdgpu-synid-nv" id="id69">nv</a></p></li>
<li><p><a class="reference internal" href="#amdgpu-synid-slc" id="id70">slc</a></p></li>
<li><p><a class="reference internal" href="#amdgpu-synid-tfe" id="id71">tfe</a></p></li>
</ul>
</li>
<li><p><a class="reference internal" href="#mubuf-mtbuf-modifiers" id="id72">MUBUF/MTBUF Modifiers</a></p>
<ul>
<li><p><a class="reference internal" href="#amdgpu-synid-idxen" id="id73">idxen</a></p></li>
<li><p><a class="reference internal" href="#offen" id="id74">offen</a></p></li>
<li><p><a class="reference internal" href="#addr64" id="id75">addr64</a></p></li>
<li><p><a class="reference internal" href="#amdgpu-synid-buf-offset12" id="id76">offset12</a></p></li>
<li><p><a class="reference internal" href="#id12" id="id77">glc</a></p></li>
<li><p><a class="reference internal" href="#id13" id="id78">slc</a></p></li>
<li><p><a class="reference internal" href="#id14" id="id79">lds</a></p></li>
<li><p><a class="reference internal" href="#id15" id="id80">dlc</a></p></li>
<li><p><a class="reference internal" href="#id16" id="id81">tfe</a></p></li>
<li><p><a class="reference internal" href="#dfmt" id="id82">dfmt</a></p></li>
<li><p><a class="reference internal" href="#nfmt" id="id83">nfmt</a></p></li>
</ul>
</li>
<li><p><a class="reference internal" href="#smrd-smem-modifiers" id="id84">SMRD/SMEM Modifiers</a></p>
<ul>
<li><p><a class="reference internal" href="#id17" id="id85">glc</a></p></li>
<li><p><a class="reference internal" href="#id18" id="id86">nv</a></p></li>
<li><p><a class="reference internal" href="#id19" id="id87">dlc</a></p></li>
</ul>
</li>
<li><p><a class="reference internal" href="#vintrp-modifiers" id="id88">VINTRP Modifiers</a></p>
<ul>
<li><p><a class="reference internal" href="#high" id="id89">high</a></p></li>
</ul>
</li>
<li><p><a class="reference internal" href="#dpp8-modifiers" id="id90">DPP8 Modifiers</a></p>
<ul>
<li><p><a class="reference internal" href="#dpp8-sel" id="id91">dpp8_sel</a></p></li>
<li><p><a class="reference internal" href="#fi" id="id92">fi</a></p></li>
</ul>
</li>
<li><p><a class="reference internal" href="#dpp-dpp16-modifiers" id="id93">DPP/DPP16 Modifiers</a></p>
<ul>
<li><p><a class="reference internal" href="#dpp-ctrl" id="id94">dpp_ctrl</a></p></li>
<li><p><a class="reference internal" href="#dpp16-ctrl" id="id95">dpp16_ctrl</a></p></li>
<li><p><a class="reference internal" href="#row-mask" id="id96">row_mask</a></p></li>
<li><p><a class="reference internal" href="#bank-mask" id="id97">bank_mask</a></p></li>
<li><p><a class="reference internal" href="#bound-ctrl" id="id98">bound_ctrl</a></p></li>
<li><p><a class="reference internal" href="#amdgpu-synid-fi16" id="id99">fi</a></p></li>
</ul>
</li>
<li><p><a class="reference internal" href="#sdwa-modifiers" id="id100">SDWA Modifiers</a></p>
<ul>
<li><p><a class="reference internal" href="#clamp" id="id101">clamp</a></p></li>
<li><p><a class="reference internal" href="#omod" id="id102">omod</a></p></li>
<li><p><a class="reference internal" href="#dst-sel" id="id103">dst_sel</a></p></li>
<li><p><a class="reference internal" href="#dst-unused" id="id104">dst_unused</a></p></li>
<li><p><a class="reference internal" href="#src0-sel" id="id105">src0_sel</a></p></li>
<li><p><a class="reference internal" href="#src1-sel" id="id106">src1_sel</a></p></li>
</ul>
</li>
<li><p><a class="reference internal" href="#sdwa-operand-modifiers" id="id107">SDWA Operand Modifiers</a></p>
<ul>
<li><p><a class="reference internal" href="#abs" id="id108">abs</a></p></li>
<li><p><a class="reference internal" href="#neg" id="id109">neg</a></p></li>
<li><p><a class="reference internal" href="#sext" id="id110">sext</a></p></li>
</ul>
</li>
<li><p><a class="reference internal" href="#vop3-modifiers" id="id111">VOP3 Modifiers</a></p>
<ul>
<li><p><a class="reference internal" href="#op-sel" id="id112">op_sel</a></p></li>
<li><p><a class="reference internal" href="#amdgpu-synid-clamp" id="id113">clamp</a></p></li>
<li><p><a class="reference internal" href="#amdgpu-synid-omod" id="id114">omod</a></p></li>
</ul>
</li>
<li><p><a class="reference internal" href="#vop3-operand-modifiers" id="id115">VOP3 Operand Modifiers</a></p>
<ul>
<li><p><a class="reference internal" href="#amdgpu-synid-abs" id="id116">abs</a></p></li>
<li><p><a class="reference internal" href="#amdgpu-synid-neg" id="id117">neg</a></p></li>
</ul>
</li>
<li><p><a class="reference internal" href="#vop3p-modifiers" id="id118">VOP3P Modifiers</a></p>
<ul>
<li><p><a class="reference internal" href="#amdgpu-synid-op-sel" id="id119">op_sel</a></p></li>
<li><p><a class="reference internal" href="#op-sel-hi" id="id120">op_sel_hi</a></p></li>
<li><p><a class="reference internal" href="#neg-lo" id="id121">neg_lo</a></p></li>
<li><p><a class="reference internal" href="#neg-hi" id="id122">neg_hi</a></p></li>
<li><p><a class="reference internal" href="#id26" id="id123">clamp</a></p></li>
</ul>
</li>
<li><p><a class="reference internal" href="#vop3p-v-mad-mix-modifiers" id="id124">VOP3P V_MAD_MIX Modifiers</a></p>
<ul>
<li><p><a class="reference internal" href="#m-op-sel" id="id125">m_op_sel</a></p></li>
<li><p><a class="reference internal" href="#m-op-sel-hi" id="id126">m_op_sel_hi</a></p></li>
<li><p><a class="reference internal" href="#id27" id="id127">abs</a></p></li>
<li><p><a class="reference internal" href="#id28" id="id128">neg</a></p></li>
<li><p><a class="reference internal" href="#id29" id="id129">clamp</a></p></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="conventions">
<h2><a class="toc-backref" href="#id30">Conventions</a><a class="headerlink" href="#conventions" title="Permalink to this headline">¶</a></h2>
<p>The following notation is used throughout this document:</p>
<blockquote>
<div><table class="docutils align-default">
<colgroup>
<col style="width: 24%" />
<col style="width: 76%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Notation</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>{0..N}</p></td>
<td><p>Any integer value in the range from 0 to N (inclusive).</p></td>
</tr>
<tr class="row-odd"><td><p>&lt;x&gt;</p></td>
<td><p>Syntax and meaning of <em>x</em> is explained elsewhere.</p></td>
</tr>
</tbody>
</table>
</div></blockquote>
</div>
<div class="section" id="modifiers">
<span id="amdgpu-syn-modifiers"></span><h2><a class="toc-backref" href="#id31">Modifiers</a><a class="headerlink" href="#modifiers" title="Permalink to this headline">¶</a></h2>
<div class="section" id="ds-modifiers">
<h3><a class="toc-backref" href="#id32">DS Modifiers</a><a class="headerlink" href="#ds-modifiers" title="Permalink to this headline">¶</a></h3>
<div class="section" id="offset8">
<span id="amdgpu-synid-ds-offset8"></span><h4><a class="toc-backref" href="#id33">offset8</a><a class="headerlink" href="#offset8" title="Permalink to this headline">¶</a></h4>
<p>Specifies an immediate unsigned 8-bit offset, in bytes. The default value is 0.</p>
<p>Used with DS instructions which have 2 addresses.</p>
<blockquote>
<div><table class="docutils align-default">
<colgroup>
<col style="width: 26%" />
<col style="width: 74%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Syntax</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>offset:{0..0xFF}</p></td>
<td><p>Specifies an unsigned 8-bit offset as a positive
<a class="reference internal" href="AMDGPUOperandSyntax.html#amdgpu-synid-integer-number"><span class="std std-ref">integer number</span></a>.</p></td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Examples:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">offset</span><span class="p">:</span><span class="mi">255</span>
<span class="n">offset</span><span class="p">:</span><span class="mh">0xff</span>
</pre></div>
</div>
</div>
<div class="section" id="offset16">
<span id="amdgpu-synid-ds-offset16"></span><h4><a class="toc-backref" href="#id34">offset16</a><a class="headerlink" href="#offset16" title="Permalink to this headline">¶</a></h4>
<p>Specifies an immediate unsigned 16-bit offset, in bytes. The default value is 0.</p>
<p>Used with DS instructions which have 1 address.</p>
<blockquote>
<div><table class="docutils align-default">
<colgroup>
<col style="width: 27%" />
<col style="width: 73%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Syntax</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>offset:{0..0xFFFF}</p></td>
<td><p>Specifies an unsigned 16-bit offset as a positive
<a class="reference internal" href="AMDGPUOperandSyntax.html#amdgpu-synid-integer-number"><span class="std std-ref">integer number</span></a>.</p></td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Examples:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">offset</span><span class="p">:</span><span class="mi">65535</span>
<span class="n">offset</span><span class="p">:</span><span class="mh">0xffff</span>
</pre></div>
</div>
</div>
<div class="section" id="swizzle-pattern">
<span id="amdgpu-synid-sw-offset16"></span><h4><a class="toc-backref" href="#id35">swizzle pattern</a><a class="headerlink" href="#swizzle-pattern" title="Permalink to this headline">¶</a></h4>
<p>This is a special modifier which may be used with <em>ds_swizzle_b32</em> instruction only.
It specifies a swizzle pattern in numeric or symbolic form. The default value is 0.</p>
<p>See AMD documentation for more information.</p>
<blockquote>
<div><table class="docutils align-default">
<colgroup>
<col style="width: 48%" />
<col style="width: 52%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Syntax</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>offset:{0..0xFFFF}</p></td>
<td><p>Specifies a 16-bit swizzle pattern.</p></td>
</tr>
<tr class="row-odd"><td><p>offset:swizzle(QUAD_PERM,{0..3},{0..3},{0..3},{0..3})</p></td>
<td><p>Specifies a quad permute mode pattern</p>
<p>Each number is a lane <em>id</em>.</p>
</td>
</tr>
<tr class="row-even"><td><p>offset:swizzle(BITMASK_PERM, “&lt;mask&gt;”)</p></td>
<td><p>Specifies a bitmask permute mode pattern.</p>
<p>The pattern converts a 5-bit lane <em>id</em> to another
lane <em>id</em> with which the lane interacts.</p>
<p><em>mask</em> is a 5 character sequence which
specifies how to transform the bits of the
lane <em>id</em>.</p>
<p>The following characters are allowed:</p>
<ul class="simple">
<li><p>“0” - set bit to 0.</p></li>
<li><p>“1” - set bit to 1.</p></li>
<li><p>“p” - preserve bit.</p></li>
<li><p>“i” - inverse bit.</p></li>
</ul>
</td>
</tr>
<tr class="row-odd"><td><p>offset:swizzle(BROADCAST,{2..32},{0..N})</p></td>
<td><p>Specifies a broadcast mode.</p>
<p>Broadcasts the value of any particular lane to
all lanes in its group.</p>
<p>The first numeric parameter is a group
size and must be equal to 2, 4, 8, 16 or 32.</p>
<p>The second numeric parameter is an index of the
lane being broadcasted.</p>
<p>The index must not exceed group size.</p>
</td>
</tr>
<tr class="row-even"><td><p>offset:swizzle(SWAP,{1..16})</p></td>
<td><p>Specifies a swap mode.</p>
<p>Swaps the neighboring groups of
1, 2, 4, 8 or 16 lanes.</p>
</td>
</tr>
<tr class="row-odd"><td><p>offset:swizzle(REVERSE,{2..32})</p></td>
<td><p>Specifies a reverse mode.</p>
<p>Reverses the lanes for groups of 2, 4, 8, 16 or 32 lanes.</p>
</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Numeric parameters may be specified as either <a class="reference internal" href="AMDGPUOperandSyntax.html#amdgpu-synid-integer-number"><span class="std std-ref">integer numbers</span></a> or
<a class="reference internal" href="AMDGPUOperandSyntax.html#amdgpu-synid-absolute-expression"><span class="std std-ref">absolute expressions</span></a>.</p>
<p>Examples:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">offset</span><span class="p">:</span><span class="mi">255</span>
<span class="n">offset</span><span class="p">:</span><span class="mh">0xffff</span>
<span class="n">offset</span><span class="p">:</span><span class="n">swizzle</span><span class="p">(</span><span class="n">QUAD_PERM</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">2</span> <span class="p">,</span><span class="mi">3</span><span class="p">)</span>
<span class="n">offset</span><span class="p">:</span><span class="n">swizzle</span><span class="p">(</span><span class="n">BITMASK_PERM</span><span class="p">,</span> <span class="s2">&quot;01pi0&quot;</span><span class="p">)</span>
<span class="n">offset</span><span class="p">:</span><span class="n">swizzle</span><span class="p">(</span><span class="n">BROADCAST</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>
<span class="n">offset</span><span class="p">:</span><span class="n">swizzle</span><span class="p">(</span><span class="n">SWAP</span><span class="p">,</span> <span class="mi">8</span><span class="p">)</span>
<span class="n">offset</span><span class="p">:</span><span class="n">swizzle</span><span class="p">(</span><span class="n">REVERSE</span><span class="p">,</span> <span class="mi">30</span> <span class="o">+</span> <span class="mi">2</span><span class="p">)</span>
</pre></div>
</div>
</div>
<div class="section" id="gds">
<span id="amdgpu-synid-gds"></span><h4><a class="toc-backref" href="#id36">gds</a><a class="headerlink" href="#gds" title="Permalink to this headline">¶</a></h4>
<p>Specifies whether to use GDS or LDS memory (LDS is the default).</p>
<blockquote>
<div><table class="docutils align-default">
<colgroup>
<col style="width: 45%" />
<col style="width: 55%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Syntax</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>gds</p></td>
<td><p>Use GDS memory.</p></td>
</tr>
</tbody>
</table>
</div></blockquote>
</div>
</div>
<div class="section" id="exp-modifiers">
<h3><a class="toc-backref" href="#id37">EXP Modifiers</a><a class="headerlink" href="#exp-modifiers" title="Permalink to this headline">¶</a></h3>
<div class="section" id="done">
<span id="amdgpu-synid-done"></span><h4><a class="toc-backref" href="#id38">done</a><a class="headerlink" href="#done" title="Permalink to this headline">¶</a></h4>
<p>Specifies if this is the last export from the shader to the target. By default,
<em>exp</em> instruction does not finish an export sequence.</p>
<blockquote>
<div><table class="docutils align-default">
<colgroup>
<col style="width: 45%" />
<col style="width: 55%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Syntax</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>done</p></td>
<td><p>Indicates the last export operation.</p></td>
</tr>
</tbody>
</table>
</div></blockquote>
</div>
<div class="section" id="compr">
<span id="amdgpu-synid-compr"></span><h4><a class="toc-backref" href="#id39">compr</a><a class="headerlink" href="#compr" title="Permalink to this headline">¶</a></h4>
<p>Indicates if the data are compressed (data are not compressed by default).</p>
<blockquote>
<div><table class="docutils align-default">
<colgroup>
<col style="width: 45%" />
<col style="width: 55%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Syntax</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>compr</p></td>
<td><p>Data are compressed.</p></td>
</tr>
</tbody>
</table>
</div></blockquote>
</div>
<div class="section" id="vm">
<span id="amdgpu-synid-vm"></span><h4><a class="toc-backref" href="#id40">vm</a><a class="headerlink" href="#vm" title="Permalink to this headline">¶</a></h4>
<p>Specifies valid mask flag state (off by default).</p>
<blockquote>
<div><table class="docutils align-default">
<colgroup>
<col style="width: 45%" />
<col style="width: 55%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Syntax</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>vm</p></td>
<td><p>Set valid mask flag.</p></td>
</tr>
</tbody>
</table>
</div></blockquote>
</div>
</div>
<div class="section" id="flat-modifiers">
<h3><a class="toc-backref" href="#id41">FLAT Modifiers</a><a class="headerlink" href="#flat-modifiers" title="Permalink to this headline">¶</a></h3>
<div class="section" id="offset12">
<span id="amdgpu-synid-flat-offset12"></span><h4><a class="toc-backref" href="#id42">offset12</a><a class="headerlink" href="#offset12" title="Permalink to this headline">¶</a></h4>
<p>Specifies an immediate unsigned 12-bit offset, in bytes. The default value is 0.</p>
<p>Cannot be used with <em>global/scratch</em> opcodes. GFX9 only.</p>
<blockquote>
<div><table class="docutils align-default">
<colgroup>
<col style="width: 24%" />
<col style="width: 76%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Syntax</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>offset:{0..4095}</p></td>
<td><p>Specifies a 12-bit unsigned offset as a positive
<a class="reference internal" href="AMDGPUOperandSyntax.html#amdgpu-synid-integer-number"><span class="std std-ref">integer number</span></a>.</p></td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Examples:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">offset</span><span class="p">:</span><span class="mi">4095</span>
<span class="n">offset</span><span class="p">:</span><span class="mh">0xff</span>
</pre></div>
</div>
</div>
<div class="section" id="offset13s">
<span id="amdgpu-synid-flat-offset13s"></span><h4><a class="toc-backref" href="#id43">offset13s</a><a class="headerlink" href="#offset13s" title="Permalink to this headline">¶</a></h4>
<p>Specifies an immediate signed 13-bit offset, in bytes. The default value is 0.</p>
<p>Can be used with <em>global/scratch</em> opcodes only. GFX9 only.</p>
<blockquote>
<div><table class="docutils align-default">
<colgroup>
<col style="width: 34%" />
<col style="width: 66%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Syntax</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>offset:{-4096..4095}</p></td>
<td><p>Specifies a 13-bit signed offset as an
<a class="reference internal" href="AMDGPUOperandSyntax.html#amdgpu-synid-integer-number"><span class="std std-ref">integer number</span></a>.</p></td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Examples:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">offset</span><span class="p">:</span><span class="o">-</span><span class="mi">4000</span>
<span class="n">offset</span><span class="p">:</span><span class="mh">0x10</span>
</pre></div>
</div>
</div>
<div class="section" id="offset12s">
<span id="amdgpu-synid-flat-offset12s"></span><h4><a class="toc-backref" href="#id44">offset12s</a><a class="headerlink" href="#offset12s" title="Permalink to this headline">¶</a></h4>
<p>Specifies an immediate signed 12-bit offset, in bytes. The default value is 0.</p>
<p>Can be used with <em>global/scratch</em> opcodes only.</p>
<p>GFX10 only.</p>
<blockquote>
<div><table class="docutils align-default">
<colgroup>
<col style="width: 34%" />
<col style="width: 66%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Syntax</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>offset:{-2048..2047}</p></td>
<td><p>Specifies a 12-bit signed offset as an
<a class="reference internal" href="AMDGPUOperandSyntax.html#amdgpu-synid-integer-number"><span class="std std-ref">integer number</span></a>.</p></td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Examples:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">offset</span><span class="p">:</span><span class="o">-</span><span class="mi">2000</span>
<span class="n">offset</span><span class="p">:</span><span class="mh">0x10</span>
</pre></div>
</div>
</div>
<div class="section" id="offset11">
<span id="amdgpu-synid-flat-offset11"></span><h4><a class="toc-backref" href="#id45">offset11</a><a class="headerlink" href="#offset11" title="Permalink to this headline">¶</a></h4>
<p>Specifies an immediate unsigned 11-bit offset, in bytes. The default value is 0.</p>
<p>Cannot be used with <em>global/scratch</em> opcodes.</p>
<p>GFX10 only.</p>
<blockquote>
<div><table class="docutils align-default">
<colgroup>
<col style="width: 24%" />
<col style="width: 76%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Syntax</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>offset:{0..2047}</p></td>
<td><p>Specifies an 11-bit unsigned offset as a positive
<a class="reference internal" href="AMDGPUOperandSyntax.html#amdgpu-synid-integer-number"><span class="std std-ref">integer number</span></a>.</p></td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Examples:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">offset</span><span class="p">:</span><span class="mi">2047</span>
<span class="n">offset</span><span class="p">:</span><span class="mh">0xff</span>
</pre></div>
</div>
</div>
<div class="section" id="dlc">
<h4><a class="toc-backref" href="#id46">dlc</a><a class="headerlink" href="#dlc" title="Permalink to this headline">¶</a></h4>
<p>See a description <a class="reference internal" href="#amdgpu-synid-dlc"><span class="std std-ref">here</span></a>. GFX10 only.</p>
</div>
<div class="section" id="glc">
<h4><a class="toc-backref" href="#id47">glc</a><a class="headerlink" href="#glc" title="Permalink to this headline">¶</a></h4>
<p>See a description <a class="reference internal" href="#amdgpu-synid-glc"><span class="std std-ref">here</span></a>.</p>
</div>
<div class="section" id="lds">
<h4><a class="toc-backref" href="#id48">lds</a><a class="headerlink" href="#lds" title="Permalink to this headline">¶</a></h4>
<p>See a description <a class="reference internal" href="#amdgpu-synid-lds"><span class="std std-ref">here</span></a>. GFX10 only.</p>
</div>
<div class="section" id="slc">
<h4><a class="toc-backref" href="#id49">slc</a><a class="headerlink" href="#slc" title="Permalink to this headline">¶</a></h4>
<p>See a description <a class="reference internal" href="#amdgpu-synid-slc"><span class="std std-ref">here</span></a>.</p>
</div>
<div class="section" id="tfe">
<h4><a class="toc-backref" href="#id50">tfe</a><a class="headerlink" href="#tfe" title="Permalink to this headline">¶</a></h4>
<p>See a description <a class="reference internal" href="#amdgpu-synid-tfe"><span class="std std-ref">here</span></a>.</p>
</div>
<div class="section" id="nv">
<h4><a class="toc-backref" href="#id51">nv</a><a class="headerlink" href="#nv" title="Permalink to this headline">¶</a></h4>
<p>See a description <a class="reference internal" href="#amdgpu-synid-nv"><span class="std std-ref">here</span></a>.</p>
</div>
</div>
<div class="section" id="mimg-modifiers">
<h3><a class="toc-backref" href="#id52">MIMG Modifiers</a><a class="headerlink" href="#mimg-modifiers" title="Permalink to this headline">¶</a></h3>
<div class="section" id="dmask">
<span id="amdgpu-synid-dmask"></span><h4><a class="toc-backref" href="#id53">dmask</a><a class="headerlink" href="#dmask" title="Permalink to this headline">¶</a></h4>
<p>Specifies which channels (image components) are used by the operation. By default, no channels
are used.</p>
<blockquote>
<div><table class="docutils align-default">
<colgroup>
<col style="width: 22%" />
<col style="width: 78%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Syntax</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>dmask:{0..15}</p></td>
<td><p>Specifies image channels as a positive
<a class="reference internal" href="AMDGPUOperandSyntax.html#amdgpu-synid-integer-number"><span class="std std-ref">integer number</span></a>.</p>
<p>Each bit corresponds to one of 4 image
components (RGBA).</p>
<p>If the specified bit value
is 0, the component is not used, value 1 means
that the component is used.</p>
</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>This modifier has some limitations depending on instruction kind:</p>
<blockquote>
<div><table class="docutils align-default">
<colgroup>
<col style="width: 68%" />
<col style="width: 32%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Instruction Kind</p></th>
<th class="head"><p>Valid dmask Values</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>32-bit atomic <em>cmpswap</em></p></td>
<td><p>0x3</p></td>
</tr>
<tr class="row-odd"><td><p>32-bit atomic instructions except for <em>cmpswap</em></p></td>
<td><p>0x1</p></td>
</tr>
<tr class="row-even"><td><p>64-bit atomic <em>cmpswap</em></p></td>
<td><p>0xF</p></td>
</tr>
<tr class="row-odd"><td><p>64-bit atomic instructions except for <em>cmpswap</em></p></td>
<td><p>0x3</p></td>
</tr>
<tr class="row-even"><td><p><em>gather4</em></p></td>
<td><p>0x1, 0x2, 0x4, 0x8</p></td>
</tr>
<tr class="row-odd"><td><p>Other instructions</p></td>
<td><p>any value</p></td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Examples:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">dmask</span><span class="p">:</span><span class="mh">0xf</span>
<span class="n">dmask</span><span class="p">:</span><span class="mb">0b1111</span>
<span class="n">dmask</span><span class="p">:</span><span class="mi">3</span>
</pre></div>
</div>
</div>
<div class="section" id="unorm">
<span id="amdgpu-synid-unorm"></span><h4><a class="toc-backref" href="#id54">unorm</a><a class="headerlink" href="#unorm" title="Permalink to this headline">¶</a></h4>
<p>Specifies whether the address is normalized or not (the address is normalized by default).</p>
<blockquote>
<div><table class="docutils align-default">
<colgroup>
<col style="width: 38%" />
<col style="width: 63%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Syntax</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>unorm</p></td>
<td><p>Force the address to be unnormalized.</p></td>
</tr>
</tbody>
</table>
</div></blockquote>
</div>
<div class="section" id="id1">
<h4><a class="toc-backref" href="#id55">glc</a><a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h4>
<p>See a description <a class="reference internal" href="#amdgpu-synid-glc"><span class="std std-ref">here</span></a>.</p>
</div>
<div class="section" id="id2">
<h4><a class="toc-backref" href="#id56">slc</a><a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h4>
<p>See a description <a class="reference internal" href="#amdgpu-synid-slc"><span class="std std-ref">here</span></a>.</p>
</div>
<div class="section" id="r128">
<span id="amdgpu-synid-r128"></span><h4><a class="toc-backref" href="#id57">r128</a><a class="headerlink" href="#r128" title="Permalink to this headline">¶</a></h4>
<p>Specifies texture resource size. The default size is 256 bits.</p>
<p>GFX7, GFX8 and GFX10 only.</p>
<blockquote>
<div><table class="docutils align-default">
<colgroup>
<col style="width: 28%" />
<col style="width: 72%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Syntax</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>r128</p></td>
<td><p>Specifies 128 bits texture resource size.</p></td>
</tr>
</tbody>
</table>
</div></blockquote>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>Using this modifier should descrease <em>rsrc</em> operand size from 8 to 4 dwords, but assembler does not currently support this feature.</p>
</div>
</div>
<div class="section" id="id3">
<h4><a class="toc-backref" href="#id58">tfe</a><a class="headerlink" href="#id3" title="Permalink to this headline">¶</a></h4>
<p>See a description <a class="reference internal" href="#amdgpu-synid-tfe"><span class="std std-ref">here</span></a>.</p>
</div>
<div class="section" id="lwe">
<span id="amdgpu-synid-lwe"></span><h4><a class="toc-backref" href="#id59">lwe</a><a class="headerlink" href="#lwe" title="Permalink to this headline">¶</a></h4>
<p>Specifies LOD warning status (LOD warning is disabled by default).</p>
<blockquote>
<div><table class="docutils align-default">
<colgroup>
<col style="width: 45%" />
<col style="width: 55%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Syntax</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>lwe</p></td>
<td><p>Enables LOD warning.</p></td>
</tr>
</tbody>
</table>
</div></blockquote>
</div>
<div class="section" id="da">
<span id="amdgpu-synid-da"></span><h4><a class="toc-backref" href="#id60">da</a><a class="headerlink" href="#da" title="Permalink to this headline">¶</a></h4>
<p>Specifies if an array index must be sent to TA. By default, array index is not sent.</p>
<blockquote>
<div><table class="docutils align-default">
<colgroup>
<col style="width: 45%" />
<col style="width: 55%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Syntax</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>da</p></td>
<td><p>Send an array-index to TA.</p></td>
</tr>
</tbody>
</table>
</div></blockquote>
</div>
<div class="section" id="d16">
<span id="amdgpu-synid-d16"></span><h4><a class="toc-backref" href="#id61">d16</a><a class="headerlink" href="#d16" title="Permalink to this headline">¶</a></h4>
<p>Specifies data size: 16 or 32 bits (32 bits by default). Not supported by GFX7.</p>
<blockquote>
<div><table class="docutils align-default">
<colgroup>
<col style="width: 45%" />
<col style="width: 55%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Syntax</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>d16</p></td>
<td><p>Enables 16-bits data mode.</p>
<p>On loads, convert data in memory to 16-bit
format before storing it in VGPRs.</p>
<p>For stores, convert 16-bit data in VGPRs to
32 bits before going to memory.</p>
<p>Note that GFX8.0 does not support data packing.
Each 16-bit data element occupies 1 VGPR.</p>
<p>GFX8.1, GFX9 and GFX10 support data packing.
Each pair of 16-bit data elements
occupies 1 VGPR.</p>
</td>
</tr>
</tbody>
</table>
</div></blockquote>
</div>
<div class="section" id="a16">
<span id="amdgpu-synid-a16"></span><h4><a class="toc-backref" href="#id62">a16</a><a class="headerlink" href="#a16" title="Permalink to this headline">¶</a></h4>
<p>Specifies size of image address components: 16 or 32 bits (32 bits by default).
GFX9 and GFX10 only.</p>
<blockquote>
<div><table class="docutils align-default">
<colgroup>
<col style="width: 45%" />
<col style="width: 55%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Syntax</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>a16</p></td>
<td><p>Enables 16-bits image address components.</p></td>
</tr>
</tbody>
</table>
</div></blockquote>
</div>
<div class="section" id="dim">
<span id="amdgpu-synid-dim"></span><h4><a class="toc-backref" href="#id63">dim</a><a class="headerlink" href="#dim" title="Permalink to this headline">¶</a></h4>
<p>Specifies surface dimension. This is a mandatory modifier. There is no default value.</p>
<p>GFX10 only.</p>
<blockquote>
<div><table class="docutils align-default">
<colgroup>
<col style="width: 35%" />
<col style="width: 65%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Syntax</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>dim:1D</p></td>
<td><p>One-dimensional image.</p></td>
</tr>
<tr class="row-odd"><td><p>dim:2D</p></td>
<td><p>Two-dimensional image.</p></td>
</tr>
<tr class="row-even"><td><p>dim:3D</p></td>
<td><p>Three-dimensional image.</p></td>
</tr>
<tr class="row-odd"><td><p>dim:CUBE</p></td>
<td><p>Cubemap array.</p></td>
</tr>
<tr class="row-even"><td><p>dim:1D_ARRAY</p></td>
<td><p>One-dimensional image array.</p></td>
</tr>
<tr class="row-odd"><td><p>dim:2D_ARRAY</p></td>
<td><p>Two-dimensional image array.</p></td>
</tr>
<tr class="row-even"><td><p>dim:2D_MSAA</p></td>
<td><p>Two-dimensional multi-sample auto-aliasing image.</p></td>
</tr>
<tr class="row-odd"><td><p>dim:2D_MSAA_ARRAY</p></td>
<td><p>Two-dimensional multi-sample auto-aliasing image array.</p></td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>The following table defines an alternative syntax which is supported
for compatibility with SP3 assembler:</p>
<blockquote>
<div><table class="docutils align-default">
<colgroup>
<col style="width: 35%" />
<col style="width: 65%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Syntax</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>dim:SQ_RSRC_IMG_1D</p></td>
<td><p>One-dimensional image.</p></td>
</tr>
<tr class="row-odd"><td><p>dim:SQ_RSRC_IMG_2D</p></td>
<td><p>Two-dimensional image.</p></td>
</tr>
<tr class="row-even"><td><p>dim:SQ_RSRC_IMG_3D</p></td>
<td><p>Three-dimensional image.</p></td>
</tr>
<tr class="row-odd"><td><p>dim:SQ_RSRC_IMG_CUBE</p></td>
<td><p>Cubemap array.</p></td>
</tr>
<tr class="row-even"><td><p>dim:SQ_RSRC_IMG_1D_ARRAY</p></td>
<td><p>One-dimensional image array.</p></td>
</tr>
<tr class="row-odd"><td><p>dim:SQ_RSRC_IMG_2D_ARRAY</p></td>
<td><p>Two-dimensional image array.</p></td>
</tr>
<tr class="row-even"><td><p>dim:SQ_RSRC_IMG_2D_MSAA</p></td>
<td><p>Two-dimensional multi-sample auto-aliasing image.</p></td>
</tr>
<tr class="row-odd"><td><p>dim:SQ_RSRC_IMG_2D_MSAA_ARRAY</p></td>
<td><p>Two-dimensional multi-sample auto-aliasing image array.</p></td>
</tr>
</tbody>
</table>
</div></blockquote>
</div>
<div class="section" id="id4">
<h4><a class="toc-backref" href="#id64">dlc</a><a class="headerlink" href="#id4" title="Permalink to this headline">¶</a></h4>
<p>See a description <a class="reference internal" href="#amdgpu-synid-dlc"><span class="std std-ref">here</span></a>. GFX10 only.</p>
</div>
</div>
<div class="section" id="miscellaneous-modifiers">
<h3><a class="toc-backref" href="#id65">Miscellaneous Modifiers</a><a class="headerlink" href="#miscellaneous-modifiers" title="Permalink to this headline">¶</a></h3>
<div class="section" id="amdgpu-synid-dlc">
<span id="id5"></span><h4><a class="toc-backref" href="#id66">dlc</a><a class="headerlink" href="#amdgpu-synid-dlc" title="Permalink to this headline">¶</a></h4>
<p>Controls device level cache policy for memory operations. Used for synchronization.
When specified, forces operation to bypass device level cache making the operation device
level coherent. By default, instructions use device level cache.</p>
<p>GFX10 only.</p>
<blockquote>
<div><table class="docutils align-default">
<colgroup>
<col style="width: 45%" />
<col style="width: 55%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Syntax</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>dlc</p></td>
<td><p>Bypass device level cache.</p></td>
</tr>
</tbody>
</table>
</div></blockquote>
</div>
<div class="section" id="amdgpu-synid-glc">
<span id="id6"></span><h4><a class="toc-backref" href="#id67">glc</a><a class="headerlink" href="#amdgpu-synid-glc" title="Permalink to this headline">¶</a></h4>
<p>This modifier has different meaning for loads, stores, and atomic operations.
The default value is off (0).</p>
<p>See AMD documentation for details.</p>
<blockquote>
<div><table class="docutils align-default">
<colgroup>
<col style="width: 45%" />
<col style="width: 55%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Syntax</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>glc</p></td>
<td><p>Set glc bit to 1.</p></td>
</tr>
</tbody>
</table>
</div></blockquote>
</div>
<div class="section" id="amdgpu-synid-lds">
<span id="id7"></span><h4><a class="toc-backref" href="#id68">lds</a><a class="headerlink" href="#amdgpu-synid-lds" title="Permalink to this headline">¶</a></h4>
<p>Specifies where to store the result: VGPRs or LDS (VGPRs by default).</p>
<blockquote>
<div><table class="docutils align-default">
<colgroup>
<col style="width: 60%" />
<col style="width: 40%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Syntax</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>lds</p></td>
<td><p>Store result in LDS.</p></td>
</tr>
</tbody>
</table>
</div></blockquote>
</div>
<div class="section" id="amdgpu-synid-nv">
<span id="id8"></span><h4><a class="toc-backref" href="#id69">nv</a><a class="headerlink" href="#amdgpu-synid-nv" title="Permalink to this headline">¶</a></h4>
<p>Specifies if instruction is operating on non-volatile memory. By default, memory is volatile.</p>
<p>GFX9 only.</p>
<blockquote>
<div><table class="docutils align-default">
<colgroup>
<col style="width: 45%" />
<col style="width: 55%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Syntax</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>nv</p></td>
<td><p>Indicates that instruction operates on
non-volatile memory.</p></td>
</tr>
</tbody>
</table>
</div></blockquote>
</div>
<div class="section" id="amdgpu-synid-slc">
<span id="id9"></span><h4><a class="toc-backref" href="#id70">slc</a><a class="headerlink" href="#amdgpu-synid-slc" title="Permalink to this headline">¶</a></h4>
<p>Specifies cache policy. The default value is off (0).</p>
<p>See AMD documentation for details.</p>
<blockquote>
<div><table class="docutils align-default">
<colgroup>
<col style="width: 45%" />
<col style="width: 55%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Syntax</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>slc</p></td>
<td><p>Set slc bit to 1.</p></td>
</tr>
</tbody>
</table>
</div></blockquote>
</div>
<div class="section" id="amdgpu-synid-tfe">
<span id="id10"></span><h4><a class="toc-backref" href="#id71">tfe</a><a class="headerlink" href="#amdgpu-synid-tfe" title="Permalink to this headline">¶</a></h4>
<p>Controls access to partially resident textures. The default value is off (0).</p>
<p>See AMD documentation for details.</p>
<blockquote>
<div><table class="docutils align-default">
<colgroup>
<col style="width: 45%" />
<col style="width: 55%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Syntax</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>tfe</p></td>
<td><p>Set tfe bit to 1.</p></td>
</tr>
</tbody>
</table>
</div></blockquote>
</div>
</div>
<div class="section" id="mubuf-mtbuf-modifiers">
<h3><a class="toc-backref" href="#id72">MUBUF/MTBUF Modifiers</a><a class="headerlink" href="#mubuf-mtbuf-modifiers" title="Permalink to this headline">¶</a></h3>
<div class="section" id="amdgpu-synid-idxen">
<span id="idxen"></span><h4><a class="toc-backref" href="#id73">idxen</a><a class="headerlink" href="#amdgpu-synid-idxen" title="Permalink to this headline">¶</a></h4>
<p>Specifies whether address components include an index. By default, no components are used.</p>
<p>Can be used together with <a class="reference internal" href="#amdgpu-synid-offen"><span class="std std-ref">offen</span></a>.</p>
<p>Cannot be used with <a class="reference internal" href="#amdgpu-synid-addr64"><span class="std std-ref">addr64</span></a>.</p>
<blockquote>
<div><table class="docutils align-default">
<colgroup>
<col style="width: 45%" />
<col style="width: 55%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Syntax</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>idxen</p></td>
<td><p>Address components include an index.</p></td>
</tr>
</tbody>
</table>
</div></blockquote>
</div>
<div class="section" id="offen">
<span id="amdgpu-synid-offen"></span><h4><a class="toc-backref" href="#id74">offen</a><a class="headerlink" href="#offen" title="Permalink to this headline">¶</a></h4>
<p>Specifies whether address components include an offset. By default, no components are used.</p>
<p>Can be used together with <a class="reference internal" href="#amdgpu-synid-idxen"><span class="std std-ref">idxen</span></a>.</p>
<p>Cannot be used with <a class="reference internal" href="#amdgpu-synid-addr64"><span class="std std-ref">addr64</span></a>.</p>
<blockquote>
<div><table class="docutils align-default">
<colgroup>
<col style="width: 45%" />
<col style="width: 55%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Syntax</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>offen</p></td>
<td><p>Address components include an offset.</p></td>
</tr>
</tbody>
</table>
</div></blockquote>
</div>
<div class="section" id="addr64">
<span id="amdgpu-synid-addr64"></span><h4><a class="toc-backref" href="#id75">addr64</a><a class="headerlink" href="#addr64" title="Permalink to this headline">¶</a></h4>
<p>Specifies whether a 64-bit address is used. By default, no address is used.</p>
<p>GFX7 only. Cannot be used with <a class="reference internal" href="#amdgpu-synid-offen"><span class="std std-ref">offen</span></a> and
<a class="reference internal" href="#amdgpu-synid-idxen"><span class="std std-ref">idxen</span></a> modifiers.</p>
<blockquote>
<div><table class="docutils align-default">
<colgroup>
<col style="width: 45%" />
<col style="width: 55%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Syntax</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>addr64</p></td>
<td><p>A 64-bit address is used.</p></td>
</tr>
</tbody>
</table>
</div></blockquote>
</div>
<div class="section" id="amdgpu-synid-buf-offset12">
<span id="id11"></span><h4><a class="toc-backref" href="#id76">offset12</a><a class="headerlink" href="#amdgpu-synid-buf-offset12" title="Permalink to this headline">¶</a></h4>
<p>Specifies an immediate unsigned 12-bit offset, in bytes. The default value is 0.</p>
<blockquote>
<div><table class="docutils align-default">
<colgroup>
<col style="width: 36%" />
<col style="width: 64%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Syntax</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>offset:{0..0xFFF}</p></td>
<td><p>Specifies a 12-bit unsigned offset as a positive
<a class="reference internal" href="AMDGPUOperandSyntax.html#amdgpu-synid-integer-number"><span class="std std-ref">integer number</span></a>.</p></td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Examples:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">offset</span><span class="p">:</span><span class="mi">0</span>
<span class="n">offset</span><span class="p">:</span><span class="mh">0x10</span>
</pre></div>
</div>
</div>
<div class="section" id="id12">
<h4><a class="toc-backref" href="#id77">glc</a><a class="headerlink" href="#id12" title="Permalink to this headline">¶</a></h4>
<p>See a description <a class="reference internal" href="#amdgpu-synid-glc"><span class="std std-ref">here</span></a>.</p>
</div>
<div class="section" id="id13">
<h4><a class="toc-backref" href="#id78">slc</a><a class="headerlink" href="#id13" title="Permalink to this headline">¶</a></h4>
<p>See a description <a class="reference internal" href="#amdgpu-synid-slc"><span class="std std-ref">here</span></a>.</p>
</div>
<div class="section" id="id14">
<h4><a class="toc-backref" href="#id79">lds</a><a class="headerlink" href="#id14" title="Permalink to this headline">¶</a></h4>
<p>See a description <a class="reference internal" href="#amdgpu-synid-lds"><span class="std std-ref">here</span></a>.</p>
</div>
<div class="section" id="id15">
<h4><a class="toc-backref" href="#id80">dlc</a><a class="headerlink" href="#id15" title="Permalink to this headline">¶</a></h4>
<p>See a description <a class="reference internal" href="#amdgpu-synid-dlc"><span class="std std-ref">here</span></a>. GFX10 only.</p>
</div>
<div class="section" id="id16">
<h4><a class="toc-backref" href="#id81">tfe</a><a class="headerlink" href="#id16" title="Permalink to this headline">¶</a></h4>
<p>See a description <a class="reference internal" href="#amdgpu-synid-tfe"><span class="std std-ref">here</span></a>.</p>
</div>
<div class="section" id="dfmt">
<span id="amdgpu-synid-dfmt"></span><h4><a class="toc-backref" href="#id82">dfmt</a><a class="headerlink" href="#dfmt" title="Permalink to this headline">¶</a></h4>
<p>TBD</p>
</div>
<div class="section" id="nfmt">
<span id="amdgpu-synid-nfmt"></span><h4><a class="toc-backref" href="#id83">nfmt</a><a class="headerlink" href="#nfmt" title="Permalink to this headline">¶</a></h4>
<p>TBD</p>
</div>
</div>
<div class="section" id="smrd-smem-modifiers">
<h3><a class="toc-backref" href="#id84">SMRD/SMEM Modifiers</a><a class="headerlink" href="#smrd-smem-modifiers" title="Permalink to this headline">¶</a></h3>
<div class="section" id="id17">
<h4><a class="toc-backref" href="#id85">glc</a><a class="headerlink" href="#id17" title="Permalink to this headline">¶</a></h4>
<p>See a description <a class="reference internal" href="#amdgpu-synid-glc"><span class="std std-ref">here</span></a>.</p>
</div>
<div class="section" id="id18">
<h4><a class="toc-backref" href="#id86">nv</a><a class="headerlink" href="#id18" title="Permalink to this headline">¶</a></h4>
<p>See a description <a class="reference internal" href="#amdgpu-synid-nv"><span class="std std-ref">here</span></a>. GFX9 only.</p>
</div>
<div class="section" id="id19">
<h4><a class="toc-backref" href="#id87">dlc</a><a class="headerlink" href="#id19" title="Permalink to this headline">¶</a></h4>
<p>See a description <a class="reference internal" href="#amdgpu-synid-dlc"><span class="std std-ref">here</span></a>. GFX10 only.</p>
</div>
</div>
<div class="section" id="vintrp-modifiers">
<h3><a class="toc-backref" href="#id88">VINTRP Modifiers</a><a class="headerlink" href="#vintrp-modifiers" title="Permalink to this headline">¶</a></h3>
<div class="section" id="high">
<span id="amdgpu-synid-high"></span><h4><a class="toc-backref" href="#id89">high</a><a class="headerlink" href="#high" title="Permalink to this headline">¶</a></h4>
<p>Specifies which half of the LDS word to use. Low half of LDS word is used by default.
GFX9 and GFX10 only.</p>
<blockquote>
<div><table class="docutils align-default">
<colgroup>
<col style="width: 56%" />
<col style="width: 44%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Syntax</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>high</p></td>
<td><p>Use high half of LDS word.</p></td>
</tr>
</tbody>
</table>
</div></blockquote>
</div>
</div>
<div class="section" id="dpp8-modifiers">
<h3><a class="toc-backref" href="#id90">DPP8 Modifiers</a><a class="headerlink" href="#dpp8-modifiers" title="Permalink to this headline">¶</a></h3>
<p>GFX10 only.</p>
<div class="section" id="dpp8-sel">
<span id="amdgpu-synid-dpp8-sel"></span><h4><a class="toc-backref" href="#id91">dpp8_sel</a><a class="headerlink" href="#dpp8-sel" title="Permalink to this headline">¶</a></h4>
<p>Selects which lane to pull data from, within a group of 8 lanes. This is a mandatory modifier.
There is no default value.</p>
<p>GFX10 only.</p>
<p>The <em>dpp8_sel</em> modifier must specify exactly 8 values, each ranging from 0 to 7.
First value selects which lane to read from to supply data into lane 0.
Second value controls value for lane 1 and so on.</p>
<blockquote>
<div><table class="docutils align-default">
<colgroup>
<col style="width: 70%" />
<col style="width: 30%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Syntax</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>dpp8:[{0..7},{0..7},{0..7},{0..7},{0..7},{0..7},{0..7},{0..7}]</p></td>
<td><p>Select lanes to read from.</p></td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Examples:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">dpp8</span><span class="p">:[</span><span class="mi">7</span><span class="p">,</span><span class="mi">6</span><span class="p">,</span><span class="mi">5</span><span class="p">,</span><span class="mi">4</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span><span class="mi">0</span><span class="p">]</span>
<span class="n">dpp8</span><span class="p">:[</span><span class="mi">0</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="mi">1</span><span class="p">]</span>
</pre></div>
</div>
</div>
<div class="section" id="fi">
<span id="amdgpu-synid-fi8"></span><h4><a class="toc-backref" href="#id92">fi</a><a class="headerlink" href="#fi" title="Permalink to this headline">¶</a></h4>
<p>Controls interaction with inactive lanes for <em>dpp8</em> instructions. The default value is zero.</p>
<p>Note. <em>Inactive</em> lanes are those whose <a class="reference internal" href="AMDGPUOperandSyntax.html#amdgpu-synid-exec"><span class="std std-ref">exec</span></a> mask bit is zero.</p>
<p>GFX10 only.</p>
<blockquote>
<div><table class="docutils align-default">
<colgroup>
<col style="width: 40%" />
<col style="width: 60%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Syntax</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>fi:0</p></td>
<td><p>Fetch zero when accessing data from inactive lanes.</p></td>
</tr>
<tr class="row-odd"><td><p>fi:1</p></td>
<td><p>Fetch pre-exist values from inactive lanes.</p></td>
</tr>
</tbody>
</table>
</div></blockquote>
</div>
</div>
<div class="section" id="dpp-dpp16-modifiers">
<h3><a class="toc-backref" href="#id93">DPP/DPP16 Modifiers</a><a class="headerlink" href="#dpp-dpp16-modifiers" title="Permalink to this headline">¶</a></h3>
<p>GFX8, GFX9 and GFX10 only.</p>
<div class="section" id="dpp-ctrl">
<span id="amdgpu-synid-dpp-ctrl"></span><h4><a class="toc-backref" href="#id94">dpp_ctrl</a><a class="headerlink" href="#dpp-ctrl" title="Permalink to this headline">¶</a></h4>
<p>Specifies how data are shared between threads. This is a mandatory modifier.
There is no default value.</p>
<p>GFX8 and GFX9 only. Use <a class="reference internal" href="#amdgpu-synid-dpp16-ctrl"><span class="std std-ref">dpp16_ctrl</span></a> for GFX10.</p>
<p>Note. The lanes of a wavefront are organized in four <em>rows</em> and four <em>banks</em>.</p>
<blockquote>
<div><table class="docutils align-default">
<colgroup>
<col style="width: 45%" />
<col style="width: 55%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Syntax</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>quad_perm:[{0..3},{0..3},{0..3},{0..3}]</p></td>
<td><p>Full permute of 4 threads.</p></td>
</tr>
<tr class="row-odd"><td><p>row_mirror</p></td>
<td><p>Mirror threads within row.</p></td>
</tr>
<tr class="row-even"><td><p>row_half_mirror</p></td>
<td><p>Mirror threads within 1/2 row (8 threads).</p></td>
</tr>
<tr class="row-odd"><td><p>row_bcast:15</p></td>
<td><p>Broadcast 15th thread of each row to next row.</p></td>
</tr>
<tr class="row-even"><td><p>row_bcast:31</p></td>
<td><p>Broadcast thread 31 to rows 2 and 3.</p></td>
</tr>
<tr class="row-odd"><td><p>wave_shl:1</p></td>
<td><p>Wavefront left shift by 1 thread.</p></td>
</tr>
<tr class="row-even"><td><p>wave_rol:1</p></td>
<td><p>Wavefront left rotate by 1 thread.</p></td>
</tr>
<tr class="row-odd"><td><p>wave_shr:1</p></td>
<td><p>Wavefront right shift by 1 thread.</p></td>
</tr>
<tr class="row-even"><td><p>wave_ror:1</p></td>
<td><p>Wavefront right rotate by 1 thread.</p></td>
</tr>
<tr class="row-odd"><td><p>row_shl:{1..15}</p></td>
<td><p>Row shift left by 1-15 threads.</p></td>
</tr>
<tr class="row-even"><td><p>row_shr:{1..15}</p></td>
<td><p>Row shift right by 1-15 threads.</p></td>
</tr>
<tr class="row-odd"><td><p>row_ror:{1..15}</p></td>
<td><p>Row rotate right by 1-15 threads.</p></td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Note: Numeric parameters may be specified as either
<a class="reference internal" href="AMDGPUOperandSyntax.html#amdgpu-synid-integer-number"><span class="std std-ref">integer numbers</span></a> or
<a class="reference internal" href="AMDGPUOperandSyntax.html#amdgpu-synid-absolute-expression"><span class="std std-ref">absolute expressions</span></a>.</p>
<p>Examples:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">quad_perm</span><span class="p">:[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">]</span>
<span class="n">row_shl</span><span class="p">:</span><span class="mi">3</span>
</pre></div>
</div>
</div>
<div class="section" id="dpp16-ctrl">
<span id="amdgpu-synid-dpp16-ctrl"></span><h4><a class="toc-backref" href="#id95">dpp16_ctrl</a><a class="headerlink" href="#dpp16-ctrl" title="Permalink to this headline">¶</a></h4>
<p>Specifies how data are shared between threads. This is a mandatory modifier.
There is no default value.</p>
<p>GFX10 only. Use <a class="reference internal" href="#amdgpu-synid-dpp-ctrl"><span class="std std-ref">dpp_ctrl</span></a> for GFX8 and GFX9.</p>
<p>Note. The lanes of a wavefront are organized in four <em>rows</em> and four <em>banks</em>.
(There are only two rows in <em>wave32</em> mode.)</p>
<blockquote>
<div><table class="docutils align-default">
<colgroup>
<col style="width: 43%" />
<col style="width: 57%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Syntax</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>quad_perm:[{0..3},{0..3},{0..3},{0..3}]</p></td>
<td><p>Full permute of 4 threads.</p></td>
</tr>
<tr class="row-odd"><td><p>row_mirror</p></td>
<td><p>Mirror threads within row.</p></td>
</tr>
<tr class="row-even"><td><p>row_half_mirror</p></td>
<td><p>Mirror threads within 1/2 row (8 threads).</p></td>
</tr>
<tr class="row-odd"><td><p>row_share:{0..15}</p></td>
<td><p>Share the value from the specified lane with other
lanes in the row.</p></td>
</tr>
<tr class="row-even"><td><p>row_xmask:{0..15}</p></td>
<td><p>Fetch from XOR(current lane id, specified lane id).</p></td>
</tr>
<tr class="row-odd"><td><p>row_shl:{1..15}</p></td>
<td><p>Row shift left by 1-15 threads.</p></td>
</tr>
<tr class="row-even"><td><p>row_shr:{1..15}</p></td>
<td><p>Row shift right by 1-15 threads.</p></td>
</tr>
<tr class="row-odd"><td><p>row_ror:{1..15}</p></td>
<td><p>Row rotate right by 1-15 threads.</p></td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Note: Numeric parameters may be specified as either
<a class="reference internal" href="AMDGPUOperandSyntax.html#amdgpu-synid-integer-number"><span class="std std-ref">integer numbers</span></a> or
<a class="reference internal" href="AMDGPUOperandSyntax.html#amdgpu-synid-absolute-expression"><span class="std std-ref">absolute expressions</span></a>.</p>
<p>Examples:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">quad_perm</span><span class="p">:[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">]</span>
<span class="n">row_shl</span><span class="p">:</span><span class="mi">3</span>
</pre></div>
</div>
</div>
<div class="section" id="row-mask">
<span id="amdgpu-synid-row-mask"></span><h4><a class="toc-backref" href="#id96">row_mask</a><a class="headerlink" href="#row-mask" title="Permalink to this headline">¶</a></h4>
<p>Controls which rows are enabled for data sharing. By default, all rows are enabled.</p>
<p>Note. The lanes of a wavefront are organized in four <em>rows</em> and four <em>banks</em>.
(There are only two rows in <em>wave32</em> mode.)</p>
<blockquote>
<div><table class="docutils align-default">
<colgroup>
<col style="width: 43%" />
<col style="width: 57%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Syntax</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>row_mask:{0..15}</p></td>
<td><p>Specifies a <em>row mask</em> as a positive
<a class="reference internal" href="AMDGPUOperandSyntax.html#amdgpu-synid-integer-number"><span class="std std-ref">integer number</span></a>.</p>
<p>Each of 4 bits in the mask controls one
row (0 - disabled, 1 - enabled).</p>
<p>In <em>wave32</em> mode the values should be limited to
{0..7}.</p>
</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Examples:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">row_mask</span><span class="p">:</span><span class="mh">0xf</span>
<span class="n">row_mask</span><span class="p">:</span><span class="mb">0b1010</span>
<span class="n">row_mask</span><span class="p">:</span><span class="mb">0b1111</span>
</pre></div>
</div>
</div>
<div class="section" id="bank-mask">
<span id="amdgpu-synid-bank-mask"></span><h4><a class="toc-backref" href="#id97">bank_mask</a><a class="headerlink" href="#bank-mask" title="Permalink to this headline">¶</a></h4>
<p>Controls which banks are enabled for data sharing. By default, all banks are enabled.</p>
<p>Note. The lanes of a wavefront are organized in four <em>rows</em> and four <em>banks</em>.
(There are only two rows in <em>wave32</em> mode.)</p>
<blockquote>
<div><table class="docutils align-default">
<colgroup>
<col style="width: 42%" />
<col style="width: 58%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Syntax</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>bank_mask:{0..15}</p></td>
<td><p>Specifies a <em>bank mask</em> as a positive
<a class="reference internal" href="AMDGPUOperandSyntax.html#amdgpu-synid-integer-number"><span class="std std-ref">integer number</span></a>.</p>
<p>Each of 4 bits in the mask controls one
bank (0 - disabled, 1 - enabled).</p>
</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Examples:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">bank_mask</span><span class="p">:</span><span class="mh">0x3</span>
<span class="n">bank_mask</span><span class="p">:</span><span class="mb">0b0011</span>
<span class="n">bank_mask</span><span class="p">:</span><span class="mb">0b1111</span>
</pre></div>
</div>
</div>
<div class="section" id="bound-ctrl">
<span id="amdgpu-synid-bound-ctrl"></span><h4><a class="toc-backref" href="#id98">bound_ctrl</a><a class="headerlink" href="#bound-ctrl" title="Permalink to this headline">¶</a></h4>
<p>Controls data sharing when accessing an invalid lane. By default, data sharing with
invalid lanes is disabled.</p>
<blockquote>
<div><table class="docutils align-default">
<colgroup>
<col style="width: 45%" />
<col style="width: 55%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Syntax</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>bound_ctrl:0</p></td>
<td><p>Enables data sharing with invalid lanes.</p>
<p>Accessing data from an invalid lane will
return zero.</p>
</td>
</tr>
</tbody>
</table>
</div></blockquote>
</div>
<div class="section" id="amdgpu-synid-fi16">
<span id="id20"></span><h4><a class="toc-backref" href="#id99">fi</a><a class="headerlink" href="#amdgpu-synid-fi16" title="Permalink to this headline">¶</a></h4>
<p>Controls interaction with <em>inactive</em> lanes for <em>dpp16</em> instructions. The default value is zero.</p>
<p>Note. <em>Inactive</em> lanes are those whose <a class="reference internal" href="AMDGPUOperandSyntax.html#amdgpu-synid-exec"><span class="std std-ref">exec</span></a> mask bit is zero.</p>
<p>GFX10 only.</p>
<blockquote>
<div><table class="docutils align-default">
<colgroup>
<col style="width: 44%" />
<col style="width: 56%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Syntax</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>fi:0</p></td>
<td><p>Interaction with inactive lanes is controlled by
<a class="reference internal" href="#amdgpu-synid-bound-ctrl"><span class="std std-ref">bound_ctrl</span></a>.</p></td>
</tr>
<tr class="row-odd"><td><p>fi:1</p></td>
<td><p>Fetch pre-exist values from inactive lanes.</p></td>
</tr>
</tbody>
</table>
</div></blockquote>
</div>
</div>
<div class="section" id="sdwa-modifiers">
<h3><a class="toc-backref" href="#id100">SDWA Modifiers</a><a class="headerlink" href="#sdwa-modifiers" title="Permalink to this headline">¶</a></h3>
<p>GFX8, GFX9 and GFX10 only.</p>
<div class="section" id="clamp">
<h4><a class="toc-backref" href="#id101">clamp</a><a class="headerlink" href="#clamp" title="Permalink to this headline">¶</a></h4>
<p>See a description <a class="reference internal" href="#amdgpu-synid-clamp"><span class="std std-ref">here</span></a>.</p>
</div>
<div class="section" id="omod">
<h4><a class="toc-backref" href="#id102">omod</a><a class="headerlink" href="#omod" title="Permalink to this headline">¶</a></h4>
<p>See a description <a class="reference internal" href="#amdgpu-synid-omod"><span class="std std-ref">here</span></a>.</p>
<p>GFX9 and GFX10 only.</p>
</div>
<div class="section" id="dst-sel">
<span id="amdgpu-synid-dst-sel"></span><h4><a class="toc-backref" href="#id103">dst_sel</a><a class="headerlink" href="#dst-sel" title="Permalink to this headline">¶</a></h4>
<p>Selects which bits in the destination are affected. By default, all bits are affected.</p>
<blockquote>
<div><table class="docutils align-default">
<colgroup>
<col style="width: 45%" />
<col style="width: 55%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Syntax</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>dst_sel:DWORD</p></td>
<td><p>Use bits 31:0.</p></td>
</tr>
<tr class="row-odd"><td><p>dst_sel:BYTE_0</p></td>
<td><p>Use bits 7:0.</p></td>
</tr>
<tr class="row-even"><td><p>dst_sel:BYTE_1</p></td>
<td><p>Use bits 15:8.</p></td>
</tr>
<tr class="row-odd"><td><p>dst_sel:BYTE_2</p></td>
<td><p>Use bits 23:16.</p></td>
</tr>
<tr class="row-even"><td><p>dst_sel:BYTE_3</p></td>
<td><p>Use bits 31:24.</p></td>
</tr>
<tr class="row-odd"><td><p>dst_sel:WORD_0</p></td>
<td><p>Use bits 15:0.</p></td>
</tr>
<tr class="row-even"><td><p>dst_sel:WORD_1</p></td>
<td><p>Use bits 31:16.</p></td>
</tr>
</tbody>
</table>
</div></blockquote>
</div>
<div class="section" id="dst-unused">
<span id="amdgpu-synid-dst-unused"></span><h4><a class="toc-backref" href="#id104">dst_unused</a><a class="headerlink" href="#dst-unused" title="Permalink to this headline">¶</a></h4>
<p>Controls what to do with the bits in the destination which are not selected
by <a class="reference internal" href="#amdgpu-synid-dst-sel"><span class="std std-ref">dst_sel</span></a>.
By default, unused bits are preserved.</p>
<blockquote>
<div><table class="docutils align-default">
<colgroup>
<col style="width: 45%" />
<col style="width: 55%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Syntax</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>dst_unused:UNUSED_PAD</p></td>
<td><p>Pad with zeros.</p></td>
</tr>
<tr class="row-odd"><td><p>dst_unused:UNUSED_SEXT</p></td>
<td><p>Sign-extend upper bits, zero lower bits.</p></td>
</tr>
<tr class="row-even"><td><p>dst_unused:UNUSED_PRESERVE</p></td>
<td><p>Preserve bits.</p></td>
</tr>
</tbody>
</table>
</div></blockquote>
</div>
<div class="section" id="src0-sel">
<span id="amdgpu-synid-src0-sel"></span><h4><a class="toc-backref" href="#id105">src0_sel</a><a class="headerlink" href="#src0-sel" title="Permalink to this headline">¶</a></h4>
<p>Controls which bits in the src0 are used. By default, all bits are used.</p>
<blockquote>
<div><table class="docutils align-default">
<colgroup>
<col style="width: 45%" />
<col style="width: 55%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Syntax</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>src0_sel:DWORD</p></td>
<td><p>Use bits 31:0.</p></td>
</tr>
<tr class="row-odd"><td><p>src0_sel:BYTE_0</p></td>
<td><p>Use bits 7:0.</p></td>
</tr>
<tr class="row-even"><td><p>src0_sel:BYTE_1</p></td>
<td><p>Use bits 15:8.</p></td>
</tr>
<tr class="row-odd"><td><p>src0_sel:BYTE_2</p></td>
<td><p>Use bits 23:16.</p></td>
</tr>
<tr class="row-even"><td><p>src0_sel:BYTE_3</p></td>
<td><p>Use bits 31:24.</p></td>
</tr>
<tr class="row-odd"><td><p>src0_sel:WORD_0</p></td>
<td><p>Use bits 15:0.</p></td>
</tr>
<tr class="row-even"><td><p>src0_sel:WORD_1</p></td>
<td><p>Use bits 31:16.</p></td>
</tr>
</tbody>
</table>
</div></blockquote>
</div>
<div class="section" id="src1-sel">
<span id="amdgpu-synid-src1-sel"></span><h4><a class="toc-backref" href="#id106">src1_sel</a><a class="headerlink" href="#src1-sel" title="Permalink to this headline">¶</a></h4>
<p>Controls which bits in the src1 are used. By default, all bits are used.</p>
<blockquote>
<div><table class="docutils align-default">
<colgroup>
<col style="width: 45%" />
<col style="width: 55%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Syntax</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>src1_sel:DWORD</p></td>
<td><p>Use bits 31:0.</p></td>
</tr>
<tr class="row-odd"><td><p>src1_sel:BYTE_0</p></td>
<td><p>Use bits 7:0.</p></td>
</tr>
<tr class="row-even"><td><p>src1_sel:BYTE_1</p></td>
<td><p>Use bits 15:8.</p></td>
</tr>
<tr class="row-odd"><td><p>src1_sel:BYTE_2</p></td>
<td><p>Use bits 23:16.</p></td>
</tr>
<tr class="row-even"><td><p>src1_sel:BYTE_3</p></td>
<td><p>Use bits 31:24.</p></td>
</tr>
<tr class="row-odd"><td><p>src1_sel:WORD_0</p></td>
<td><p>Use bits 15:0.</p></td>
</tr>
<tr class="row-even"><td><p>src1_sel:WORD_1</p></td>
<td><p>Use bits 31:16.</p></td>
</tr>
</tbody>
</table>
</div></blockquote>
</div>
</div>
<div class="section" id="sdwa-operand-modifiers">
<span id="amdgpu-synid-sdwa-operand-modifiers"></span><h3><a class="toc-backref" href="#id107">SDWA Operand Modifiers</a><a class="headerlink" href="#sdwa-operand-modifiers" title="Permalink to this headline">¶</a></h3>
<p>Operand modifiers are not used separately. They are applied to source operands.</p>
<p>GFX8, GFX9 and GFX10 only.</p>
<div class="section" id="abs">
<h4><a class="toc-backref" href="#id108">abs</a><a class="headerlink" href="#abs" title="Permalink to this headline">¶</a></h4>
<p>See a description <a class="reference internal" href="#amdgpu-synid-abs"><span class="std std-ref">here</span></a>.</p>
</div>
<div class="section" id="neg">
<h4><a class="toc-backref" href="#id109">neg</a><a class="headerlink" href="#neg" title="Permalink to this headline">¶</a></h4>
<p>See a description <a class="reference internal" href="#amdgpu-synid-neg"><span class="std std-ref">here</span></a>.</p>
</div>
<div class="section" id="sext">
<span id="amdgpu-synid-sext"></span><h4><a class="toc-backref" href="#id110">sext</a><a class="headerlink" href="#sext" title="Permalink to this headline">¶</a></h4>
<p>Sign-extends value of a (sub-dword) operand to fill all 32 bits.
Has no effect for 32-bit operands.</p>
<p>Valid for integer operands only.</p>
<blockquote>
<div><table class="docutils align-default">
<colgroup>
<col style="width: 45%" />
<col style="width: 55%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Syntax</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>sext(&lt;operand&gt;)</p></td>
<td><p>Sign-extend operand value.</p></td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Examples:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sext</span><span class="p">(</span><span class="n">v4</span><span class="p">)</span>
<span class="n">sext</span><span class="p">(</span><span class="n">v255</span><span class="p">)</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="vop3-modifiers">
<h3><a class="toc-backref" href="#id111">VOP3 Modifiers</a><a class="headerlink" href="#vop3-modifiers" title="Permalink to this headline">¶</a></h3>
<div class="section" id="op-sel">
<span id="amdgpu-synid-vop3-op-sel"></span><h4><a class="toc-backref" href="#id112">op_sel</a><a class="headerlink" href="#op-sel" title="Permalink to this headline">¶</a></h4>
<p>Selects the low [15:0] or high [31:16] operand bits for source and destination operands.
By default, low bits are used for all operands.</p>
<p>The number of values specified with the op_sel modifier must match the number of instruction
operands (both source and destination). First value controls src0, second value controls src1
and so on, except that the last value controls destination.
The value 0 selects the low bits, while 1 selects the high bits.</p>
<p>Note. op_sel modifier affects 16-bit operands only. For 32-bit operands the value specified
by op_sel must be 0.</p>
<p>GFX9 and GFX10 only.</p>
<blockquote>
<div><table class="docutils align-default">
<colgroup>
<col style="width: 40%" />
<col style="width: 60%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Syntax</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>op_sel:[{0..1},{0..1}]</p></td>
<td><p>Select operand bits for instructions with 1 source operand.</p></td>
</tr>
<tr class="row-odd"><td><p>op_sel:[{0..1},{0..1},{0..1}]</p></td>
<td><p>Select operand bits for instructions with 2 source operands.</p></td>
</tr>
<tr class="row-even"><td><p>op_sel:[{0..1},{0..1},{0..1},{0..1}]</p></td>
<td><p>Select operand bits for instructions with 3 source operands.</p></td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Examples:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">op_sel</span><span class="p">:[</span><span class="mi">0</span><span class="p">,</span><span class="mi">0</span><span class="p">]</span>
<span class="n">op_sel</span><span class="p">:[</span><span class="mi">0</span><span class="p">,</span><span class="mi">1</span><span class="p">]</span>
</pre></div>
</div>
</div>
<div class="section" id="amdgpu-synid-clamp">
<span id="id21"></span><h4><a class="toc-backref" href="#id113">clamp</a><a class="headerlink" href="#amdgpu-synid-clamp" title="Permalink to this headline">¶</a></h4>
<p>Clamp meaning depends on instruction.</p>
<p>For <em>v_cmp</em> instructions, clamp modifier indicates that the compare signals
if a floating point exception occurs. By default, signaling is disabled.
Not supported by GFX7.</p>
<p>For integer operations, clamp modifier indicates that the result must be clamped
to the largest and smallest representable value. By default, there is no clamping.
Integer clamping is not supported by GFX7.</p>
<p>For floating point operations, clamp modifier indicates that the result must be clamped
to the range [0.0, 1.0]. By default, there is no clamping.</p>
<p>Note. Clamp modifier is applied after <a class="reference internal" href="#amdgpu-synid-omod"><span class="std std-ref">output modifiers</span></a> (if any).</p>
<blockquote>
<div><table class="docutils align-default">
<colgroup>
<col style="width: 45%" />
<col style="width: 55%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Syntax</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>clamp</p></td>
<td><p>Enables clamping (or signaling).</p></td>
</tr>
</tbody>
</table>
</div></blockquote>
</div>
<div class="section" id="amdgpu-synid-omod">
<span id="id22"></span><h4><a class="toc-backref" href="#id114">omod</a><a class="headerlink" href="#amdgpu-synid-omod" title="Permalink to this headline">¶</a></h4>
<p>Specifies if an output modifier must be applied to the result.
By default, no output modifiers are applied.</p>
<p>Note. Output modifiers are applied before <a class="reference internal" href="#amdgpu-synid-clamp"><span class="std std-ref">clamping</span></a> (if any).</p>
<p>Output modifiers are valid for f32 and f64 floating point results only.
They must not be used with f16.</p>
<p>Note. <em>v_cvt_f16_f32</em> is an exception. This instruction produces f16 result
but accepts output modifiers.</p>
<blockquote>
<div><table class="docutils align-default">
<colgroup>
<col style="width: 45%" />
<col style="width: 55%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Syntax</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>mul:2</p></td>
<td><p>Multiply the result by 2.</p></td>
</tr>
<tr class="row-odd"><td><p>mul:4</p></td>
<td><p>Multiply the result by 4.</p></td>
</tr>
<tr class="row-even"><td><p>div:2</p></td>
<td><p>Multiply the result by 0.5.</p></td>
</tr>
</tbody>
</table>
</div></blockquote>
</div>
</div>
<div class="section" id="vop3-operand-modifiers">
<span id="amdgpu-synid-vop3-operand-modifiers"></span><h3><a class="toc-backref" href="#id115">VOP3 Operand Modifiers</a><a class="headerlink" href="#vop3-operand-modifiers" title="Permalink to this headline">¶</a></h3>
<p>Operand modifiers are not used separately. They are applied to source operands.</p>
<div class="section" id="amdgpu-synid-abs">
<span id="id23"></span><h4><a class="toc-backref" href="#id116">abs</a><a class="headerlink" href="#amdgpu-synid-abs" title="Permalink to this headline">¶</a></h4>
<p>Computes absolute value of its operand. Applied before <a class="reference internal" href="#amdgpu-synid-neg"><span class="std std-ref">neg</span></a> (if any).
Valid for floating point operands only.</p>
<blockquote>
<div><table class="docutils align-default">
<colgroup>
<col style="width: 45%" />
<col style="width: 55%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Syntax</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>abs(&lt;operand&gt;)</p></td>
<td><p>Get absolute value of operand.</p></td>
</tr>
<tr class="row-odd"><td><p>|&lt;operand&gt;|</p></td>
<td><p>The same as above.</p></td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Examples:</p>
<pre class="literal-block">abs(v36)
|v36|</pre>
</div>
<div class="section" id="amdgpu-synid-neg">
<span id="id24"></span><h4><a class="toc-backref" href="#id117">neg</a><a class="headerlink" href="#amdgpu-synid-neg" title="Permalink to this headline">¶</a></h4>
<p>Computes negative value of its operand. Applied after <a class="reference internal" href="#amdgpu-synid-abs"><span class="std std-ref">abs</span></a> (if any).
Valid for floating point operands only.</p>
<blockquote>
<div><table class="docutils align-default">
<colgroup>
<col style="width: 45%" />
<col style="width: 55%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Syntax</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>neg(&lt;operand&gt;)</p></td>
<td><p>Get negative value of operand.</p></td>
</tr>
<tr class="row-odd"><td><p>-&lt;operand&gt;</p></td>
<td><p>The same as above.</p></td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Examples:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">neg</span><span class="p">(</span><span class="n">v</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span>
<span class="o">-</span><span class="n">v4</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="vop3p-modifiers">
<h3><a class="toc-backref" href="#id118">VOP3P Modifiers</a><a class="headerlink" href="#vop3p-modifiers" title="Permalink to this headline">¶</a></h3>
<p>This section describes modifiers of <em>regular</em> VOP3P instructions.</p>
<p><em>v_mad_mix_f32</em>, <em>v_mad_mixhi_f16</em> and <em>v_mad_mixlo_f16</em>
instructions use these modifiers <a class="reference internal" href="#amdgpu-synid-mad-mix"><span class="std std-ref">in a special manner</span></a>.</p>
<p>GFX9 and GFX10 only.</p>
<div class="section" id="amdgpu-synid-op-sel">
<span id="id25"></span><h4><a class="toc-backref" href="#id119">op_sel</a><a class="headerlink" href="#amdgpu-synid-op-sel" title="Permalink to this headline">¶</a></h4>
<p>Selects the low [15:0] or high [31:16] operand bits as input to the operation
which results in the lower-half of the destination.
By default, low bits are used for all operands.</p>
<p>The number of values specified by the <em>op_sel</em> modifier must match the number of source
operands. First value controls src0, second value controls src1 and so on.</p>
<p>The value 0 selects the low bits, while 1 selects the high bits.</p>
<blockquote>
<div><table class="docutils align-default">
<colgroup>
<col style="width: 35%" />
<col style="width: 65%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Syntax</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>op_sel:[{0..1}]</p></td>
<td><p>Select operand bits for instructions with 1 source operand.</p></td>
</tr>
<tr class="row-odd"><td><p>op_sel:[{0..1},{0..1}]</p></td>
<td><p>Select operand bits for instructions with 2 source operands.</p></td>
</tr>
<tr class="row-even"><td><p>op_sel:[{0..1},{0..1},{0..1}]</p></td>
<td><p>Select operand bits for instructions with 3 source operands.</p></td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Examples:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">op_sel</span><span class="p">:[</span><span class="mi">0</span><span class="p">,</span><span class="mi">0</span><span class="p">]</span>
<span class="n">op_sel</span><span class="p">:[</span><span class="mi">0</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span><span class="mi">0</span><span class="p">]</span>
</pre></div>
</div>
</div>
<div class="section" id="op-sel-hi">
<span id="amdgpu-synid-op-sel-hi"></span><h4><a class="toc-backref" href="#id120">op_sel_hi</a><a class="headerlink" href="#op-sel-hi" title="Permalink to this headline">¶</a></h4>
<p>Selects the low [15:0] or high [31:16] operand bits as input to the operation
which results in the upper-half of the destination.
By default, high bits are used for all operands.</p>
<p>The number of values specified by the <em>op_sel_hi</em> modifier must match the number of source
operands. First value controls src0, second value controls src1 and so on.</p>
<p>The value 0 selects the low bits, while 1 selects the high bits.</p>
<blockquote>
<div><table class="docutils align-default">
<colgroup>
<col style="width: 36%" />
<col style="width: 64%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Syntax</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>op_sel_hi:[{0..1}]</p></td>
<td><p>Select operand bits for instructions with 1 source operand.</p></td>
</tr>
<tr class="row-odd"><td><p>op_sel_hi:[{0..1},{0..1}]</p></td>
<td><p>Select operand bits for instructions with 2 source operands.</p></td>
</tr>
<tr class="row-even"><td><p>op_sel_hi:[{0..1},{0..1},{0..1}]</p></td>
<td><p>Select operand bits for instructions with 3 source operands.</p></td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Examples:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">op_sel_hi</span><span class="p">:[</span><span class="mi">0</span><span class="p">,</span><span class="mi">0</span><span class="p">]</span>
<span class="n">op_sel_hi</span><span class="p">:[</span><span class="mi">0</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="mi">1</span><span class="p">]</span>
</pre></div>
</div>
</div>
<div class="section" id="neg-lo">
<span id="amdgpu-synid-neg-lo"></span><h4><a class="toc-backref" href="#id121">neg_lo</a><a class="headerlink" href="#neg-lo" title="Permalink to this headline">¶</a></h4>
<p>Specifies whether to change sign of operand values selected by
<a class="reference internal" href="#amdgpu-synid-op-sel"><span class="std std-ref">op_sel</span></a>. These values are then used
as input to the operation which results in the upper-half of the destination.</p>
<p>The number of values specified by this modifier must match the number of source
operands. First value controls src0, second value controls src1 and so on.</p>
<p>The value 0 indicates that the corresponding operand value is used unmodified,
the value 1 indicates that negative value of the operand must be used.</p>
<p>By default, operand values are used unmodified.</p>
<p>This modifier is valid for floating point operands only.</p>
<blockquote>
<div><table class="docutils align-default">
<colgroup>
<col style="width: 33%" />
<col style="width: 67%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Syntax</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>neg_lo:[{0..1}]</p></td>
<td><p>Select affected operands for instructions with 1 source operand.</p></td>
</tr>
<tr class="row-odd"><td><p>neg_lo:[{0..1},{0..1}]</p></td>
<td><p>Select affected operands for instructions with 2 source operands.</p></td>
</tr>
<tr class="row-even"><td><p>neg_lo:[{0..1},{0..1},{0..1}]</p></td>
<td><p>Select affected operands for instructions with 3 source operands.</p></td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Examples:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">neg_lo</span><span class="p">:[</span><span class="mi">0</span><span class="p">]</span>
<span class="n">neg_lo</span><span class="p">:[</span><span class="mi">0</span><span class="p">,</span><span class="mi">1</span><span class="p">]</span>
</pre></div>
</div>
</div>
<div class="section" id="neg-hi">
<span id="amdgpu-synid-neg-hi"></span><h4><a class="toc-backref" href="#id122">neg_hi</a><a class="headerlink" href="#neg-hi" title="Permalink to this headline">¶</a></h4>
<p>Specifies whether to change sign of operand values selected by
<a class="reference internal" href="#amdgpu-synid-op-sel-hi"><span class="std std-ref">op_sel_hi</span></a>. These values are then used
as input to the operation which results in the upper-half of the destination.</p>
<p>The number of values specified by this modifier must match the number of source
operands. First value controls src0, second value controls src1 and so on.</p>
<p>The value 0 indicates that the corresponding operand value is used unmodified,
the value 1 indicates that negative value of the operand must be used.</p>
<p>By default, operand values are used unmodified.</p>
<p>This modifier is valid for floating point operands only.</p>
<blockquote>
<div><table class="docutils align-default">
<colgroup>
<col style="width: 32%" />
<col style="width: 68%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Syntax</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>neg_hi:[{0..1}]</p></td>
<td><p>Select affected operands for instructions with 1 source operand.</p></td>
</tr>
<tr class="row-odd"><td><p>neg_hi:[{0..1},{0..1}]</p></td>
<td><p>Select affected operands for instructions with 2 source operands.</p></td>
</tr>
<tr class="row-even"><td><p>neg_hi:[{0..1},{0..1},{0..1}]</p></td>
<td><p>Select affected operands for instructions with 3 source operands.</p></td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Examples:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">neg_hi</span><span class="p">:[</span><span class="mi">1</span><span class="p">,</span><span class="mi">0</span><span class="p">]</span>
<span class="n">neg_hi</span><span class="p">:[</span><span class="mi">0</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span><span class="mi">1</span><span class="p">]</span>
</pre></div>
</div>
</div>
<div class="section" id="id26">
<h4><a class="toc-backref" href="#id123">clamp</a><a class="headerlink" href="#id26" title="Permalink to this headline">¶</a></h4>
<p>See a description <a class="reference internal" href="#amdgpu-synid-clamp"><span class="std std-ref">here</span></a>.</p>
</div>
</div>
<div class="section" id="vop3p-v-mad-mix-modifiers">
<span id="amdgpu-synid-mad-mix"></span><h3><a class="toc-backref" href="#id124">VOP3P V_MAD_MIX Modifiers</a><a class="headerlink" href="#vop3p-v-mad-mix-modifiers" title="Permalink to this headline">¶</a></h3>
<p><em>v_mad_mix_f32</em>, <em>v_mad_mixhi_f16</em> and <em>v_mad_mixlo_f16</em> instructions
use <em>op_sel</em> and <em>op_sel_hi</em> modifiers
in a manner different from <em>regular</em> VOP3P instructions.</p>
<p>See a description below.</p>
<p>GFX9 and GFX10 only.</p>
<div class="section" id="m-op-sel">
<span id="amdgpu-synid-mad-mix-op-sel"></span><h4><a class="toc-backref" href="#id125">m_op_sel</a><a class="headerlink" href="#m-op-sel" title="Permalink to this headline">¶</a></h4>
<p>This operand has meaning only for 16-bit source operands as indicated by
<a class="reference internal" href="#amdgpu-synid-mad-mix-op-sel-hi"><span class="std std-ref">m_op_sel_hi</span></a>.
It specifies to select either the low [15:0] or high [31:16] operand bits
as input to the operation.</p>
<p>The number of values specified by the <em>op_sel</em> modifier must match the number of source
operands. First value controls src0, second value controls src1 and so on.</p>
<p>The value 0 indicates the low bits, the value 1 indicates the high 16 bits.</p>
<p>By default, low bits are used for all operands.</p>
<blockquote>
<div><table class="docutils align-default">
<colgroup>
<col style="width: 39%" />
<col style="width: 61%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Syntax</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>op_sel:[{0..1},{0..1},{0..1}]</p></td>
<td><p>Select location of each 16-bit source operand.</p></td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Examples:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">op_sel</span><span class="p">:[</span><span class="mi">0</span><span class="p">,</span><span class="mi">1</span><span class="p">]</span>
</pre></div>
</div>
</div>
<div class="section" id="m-op-sel-hi">
<span id="amdgpu-synid-mad-mix-op-sel-hi"></span><h4><a class="toc-backref" href="#id126">m_op_sel_hi</a><a class="headerlink" href="#m-op-sel-hi" title="Permalink to this headline">¶</a></h4>
<p>Selects the size of source operands: either 32 bits or 16 bits.
By default, 32 bits are used for all source operands.</p>
<p>The number of values specified by the <em>op_sel_hi</em> modifier must match the number of source
operands. First value controls src0, second value controls src1 and so on.</p>
<p>The value 0 indicates 32 bits, the value 1 indicates 16 bits.</p>
<p>The location of 16 bits in the operand may be specified by
<a class="reference internal" href="#amdgpu-synid-mad-mix-op-sel"><span class="std std-ref">m_op_sel</span></a>.</p>
<blockquote>
<div><table class="docutils align-default">
<colgroup>
<col style="width: 53%" />
<col style="width: 47%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Syntax</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>op_sel_hi:[{0..1},{0..1},{0..1}]</p></td>
<td><p>Select size of each source operand.</p></td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Examples:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">op_sel_hi</span><span class="p">:[</span><span class="mi">1</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span><span class="mi">1</span><span class="p">]</span>
</pre></div>
</div>
</div>
<div class="section" id="id27">
<h4><a class="toc-backref" href="#id127">abs</a><a class="headerlink" href="#id27" title="Permalink to this headline">¶</a></h4>
<p>See a description <a class="reference internal" href="#amdgpu-synid-abs"><span class="std std-ref">here</span></a>.</p>
</div>
<div class="section" id="id28">
<h4><a class="toc-backref" href="#id128">neg</a><a class="headerlink" href="#id28" title="Permalink to this headline">¶</a></h4>
<p>See a description <a class="reference internal" href="#amdgpu-synid-neg"><span class="std std-ref">here</span></a>.</p>
</div>
<div class="section" id="id29">
<h4><a class="toc-backref" href="#id129">clamp</a><a class="headerlink" href="#id29" title="Permalink to this headline">¶</a></h4>
<p>See a description <a class="reference internal" href="#amdgpu-synid-clamp"><span class="std std-ref">here</span></a>.</p>
</div>
</div>
</div>
</div>


            <div class="clearer"></div>
          </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="AMDGPUOperandSyntax.html" title="Syntax of AMDGPU Instruction Operands"
             >next</a> |</li>
        <li class="right" >
          <a href="AMDGPU/gfx10_type_dev.html" title="Type deviation"
             >previous</a> |</li>
  <li><a href="http://llvm.org/">LLVM Home</a>&nbsp;|&nbsp;</li>
  <li><a href="index.html">Documentation</a>&raquo;</li>

          <li class="nav-item nav-item-1"><a href="AMDGPUUsage.html" >User Guide for AMDGPU Backend</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="">Syntax of AMDGPU Instruction Modifiers</a></li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
        &#169; Copyright 2003-2020, LLVM Project.
      Last updated on 2020-09-20.
      Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.2.1.
    </div>
  </body>
</html>